Let waypt_dupe copy desc_short and desc_long so that Mapsource output
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 21 Sep 2004 18:12:29 +0000 (18:12 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 21 Sep 2004 18:12:29 +0000 (18:12 +0000)
of a PQ doesn't tank the KMA.

gpsbabel/waypt.c

index f91b503f22231239256862fa3dddc43720ac456f..9b5aa9c050b01e28e7d75691c0087c1758e00ba9 100644 (file)
@@ -52,6 +52,14 @@ waypt_dupe(const waypoint *wpt)
                tmp->url_link_text = xstrdup(wpt->url_link_text);
        if (wpt->icon_descr && wpt->icon_descr_is_dynamic)
                tmp->icon_descr = xstrdup(wpt->icon_descr);
+       if (wpt->gc_data.desc_short.utfstring) {
+               tmp->gc_data.desc_short.utfstring = 
+                       xstrdup(tmp->gc_data.desc_short.utfstring);
+       }
+       if (wpt->gc_data.desc_long.utfstring) {
+               tmp->gc_data.desc_long.utfstring = 
+                       xstrdup(tmp->gc_data.desc_long.utfstring);
+       }
        /*
         * It's important that this duplicated waypoint not appear
         * on the master Q.